package com.utils.jackyun;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/**
 * 吉客云商品映射
 * @Description: 
 * @author daigb
 * @date 2021-06-28
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class JkyDeliveryOrderConfirmDTO {

    @JsonProperty(value = "deliveryOrder")
    private deliveryOrder deliveryOrder;
    
    /**
     * developerInfo
     */
    @JsonProperty(value = "packages")
    private List<Packages> packages;

    @Data
    public static class deliveryOrder {

        @JsonProperty(value = "deliveryOrderCode")
        private String deliveryOrderCode;

        @JsonProperty(value = "warehouseCode")
        private String warehouseCode;

        @JsonProperty(value = "orderType")
        private String orderType;
        
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Packages {

        //物流公司编码
        @JsonProperty(value = "logisticsCode")
        private String logisticsCode;

        //物流公司名称
        @JsonProperty(value = "logisticsName")
        private String logisticsName;

        //运单号
        @JsonProperty(value = "expressCode")
        private String expressCode;

        @JsonProperty(value = "items")
        private List<Item> items;
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Item {

        @JsonProperty(value = "itemCode")
        private String itemCode;

        @JsonProperty(value = "itemId")
        private String itemId;

        @JsonProperty(value = "quantity")
        private Integer quantity;

    }

}
